﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ScoreCodeManager.aspx.cs"
    Inherits="SDZJ.ManagerView.StudentManager.ScoreCodeManager" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="../../ExtendControls/GetStudent.ascx" TagName="GetStudent" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1-vsdoc.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.5.1.js"></script>
    <script type="text/javascript" src="../../Scripts/ui/jquery-ui-1.8.14.custom.js"></script>
    <script src="../../Scripts/ui/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
    <link href="../../Scripts/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <link href="../style/css.css" rel="stylesheet" type="text/css" />
</head>
<style type="text/css" media="screen">
    body
    {
        width: 100%;
        height: 100%;
        overflow: auto;
        overflow-x: hidden;
        overflow-y: hidden;
    }
    #mainFrame
    {
        /*position: absolute;*/
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
    }
    #dataFrame
    {
        width: 100%;
        height: 100%; /*margin-bottom: -60px;*/
    }
    #controlFrame
    {
    }
    #toolFrame
    {
    }
    
    #mask
    {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        position: absolute;
        z-index: 9000;
        background-color: #FFF;
        display: none;
    }
    #boxes .window
    {
        background-color: #f3f3f3;
        position: absolute;
        width: auto;
        height: auto;
        display: none;
        z-index: 9999;
        padding: 1px;
    }
    /* Customize your modal window here, you can add background image too */
    #boxes #dialog
    {
        width: 350px;
        height: auto;
        padding: 1px;
    }
</style>
<script language="javascript" type="text/javascript">

    $(document).ready(function () {
        $('#date').datepicker();

        //select all the a tag with name equal to modal 
        $('#btn_add').click(function () { showDiv("新建积分记录"); });
        $('#btn_alter').click(function () { showDiv("积分记录属性"); });
        $('#btn_refresh').click(function () {
            refHandel();
        })
        $('#btn_drop').click(function () {
            if ($("#selectedIndex").val() == -1) {
                alert("未选中任何项");
            }
            else {
                if (confirm("删除选定记录？")) __doPostBack('<%=lnkDelCourseCate.UniqueID%>', '');
            }
        })


        $('#t').click(function () { showDiv("新建积分记录"); });

    });

    function refHandel() {
        __doPostBack('<%=lnkRefCourseCate.UniqueID%>', '');
    }

    function showDiv(ti) {
        $('#title').text(ti);
        var maskHeight = $(document).height();
        var maskWidth = $(window).width();
        //Set heigth and width to mask to fill up the whole screen 
        $('#mask').css({ 'width': maskWidth, 'height': maskHeight });
        //transition effect 
        $('#mask').fadeIn(1000);
        $('#mask').fadeTo("slow", 0.8);
        //Get the window height and width 
        var winH = $(window).height();
        var winW = $(window).width();

        //Set the popup window to center 
        $("#dialog").css('top', winH / 2 - $("#dialog").height() / 2);
        $("#dialog").css('left', winW / 2 - $("#dialog").width() / 2);
        //transition effect
        $("#dialog").fadeIn(1000);
    }

    function closeDiv() {
        $('#mask, .window').fadeOut(500);
    }

    function addreuslt(msg) {
        if (msg == "") {
            $('#mask, .window').fadeOut(500); // hide();
            $("#txtCode").val("");
            $("#txtType").val("");
        }
        else
            alert(msg);

    }

    function showeditdiv() {
        //alert($("#txtId").val());
        if ($("#txtId").val() == "")
            return;
        showDiv();
        var code = $("#txtId").val();
        var value = $("#txtValue").val();
        $("#txtCode").attr("disabled", true);
        $("#txtCode").val(code);
        $("#txtType").val(value);
        $("#btnEdit").show();
        $("#btnOK").hide();
    }

    function editdiv(code, type) {
        showDiv();
        $("#txtCode").attr("disabled", true);
        $("#txtCode").val(code);
        $("#txtType").val(type);
        $("#btnEdit").show();
        $("#btnOK").hide();
    }

    function checkvalue() {
        if ($("#txtCode").val() == "") {
            alert("请输入信息类别编码！");
            return false;
        }
        if ($("#txtCode").val().length > 4) {
            alert("信息类别编码长度最大为四位！");
            return false;
        }
        if ($("#txtType").val() == "") {
            alert("请输入信息类别！");
            return false;
        }
        return true;
    }

    var prevselitem = null;
    function selectx(row, rowIdx) {
        if (prevselitem != null) {
            prevselitem.style.backgroundColor = '#ffffff';
        }
        row.style.backgroundColor = 'PeachPuff';
        prevselitem = row;
        $("#selectedIndex").val(rowIdx);
    }
</script>
<body>
    <form id="Form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="boxes">
        <!-- #customize your modal window here -->
        <div id="dialog" class="window">
            <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="0%" height="18"><img src="../images/bor01.gif" width="10" height="18"></td>
    <td width="100%" background="../images/bor02.gif"></td>
    <td width="0%"><img src="../images/bor03.gif" width="10" height="18"></td>
  </tr>
  <tr>
    <td background="../images/bor04.gif"></td>
    <td align="center" valign="top" bgcolor="#c6d4e4"><div class="add_title"><asp:Label ID="title" Text="asdasd" runat="server" /></div>
    <div class="set_bg" style="padding-top:3px;"><img src="../images/lines01.gif" width="2" height="13" hspace="5" align="absmiddle"><img src="../images/button04.gif" width="51" height="23" align="absmiddle"><img src="../images/button05.gif" width="51" height="23" hspace="5" align="absmiddle"></div>
    <table width="100%" border="0" cellpadding="3" cellspacing="0" class="add_center">
      
      <tr>
        <td align="center">任务状态:</td>
        <td><select name="select" style="width:293px;">
        </select></td>
      </tr>
      <tr>
        <td height="33" align="center">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
    <td background="../images/bor05.gif"></td>
  </tr>
  <tr>
    <td height="0"><img src="../images/bor06.gif" width="10" height="10"></td>
    <td height="10" background="../images/bor07.gif"></td>
    <td height="0"><img src="../images/bor08.gif" width="10" height="10"></td>
  </tr>
</table>
        </div>
        <!-- Do not remove div#mask, because you'll need it to fill the whole screen -->
        <div id="mask">
        </div>
    </div>
    <div id="boxes2">
        <div id="dialog2">
            <uc1:GetStudent ID="GetStudent1" runat="server" />
        </div>
        <div id="mask2">
        </div>
    </div>
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" id="right">
        <tr>
            <td colspan="2" class="right_top">
                积分管理
            </td>
        </tr>
        <tr>
            <td colspan="2" class="set_bg">
                <input type="button" id="t" value="ddd" />
                <img src="../images/add.gif" width="51" height="23" hspace="5" align="absmiddle"
                    id="btn_add">
                <img src="../images/button06.gif" width="51" height="23" align="absmiddle" id="btn_alter">
                <img src="../images/button07.gif" width="51" height="23" hspace="5" align="absmiddle"
                    id="btn_drop">
                <img src="../images/button01.gif" width="51" height="23" hspace="5" align="absmiddle"
                    id="btn_refresh">
                <input id="selectedIndex" type="hidden" value="0" runat="server" />
            </td>
        </tr>
        <tr height="100%">
            <td colspan="2" valign="top" height="100%">
                <asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Conditional" runat="server">
                    <ContentTemplate>
                        <asp:TreeView ID="tvCourseCate" ExpandDepth="0" runat="server" ImageSet="WindowsHelp"
                            Width="100%">
                            <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
                            <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px"
                                NodeSpacing="0px" VerticalPadding="1px" />
                            <ParentNodeStyle Font-Bold="False" />
                            <SelectedNodeStyle Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px"
                                BackColor="#B5B5B5" />
                        </asp:TreeView>
                        <asp:LinkButton ID="lnkRefCourseCate" Text="" runat="server" Visible="false" OnClick="refAddCourseCate_Click"></asp:LinkButton>
                        <asp:LinkButton ID="lnkDelCourseCate" Text="" runat="server" Visible="true" OnClick="refDelCourseCate_Click"></asp:LinkButton>
                        <asp:GridView ID="scoreView" Width="100%" runat="server" OnRowDataBound="scoreView_RowDataBound"
                            AlternatingRowStyle-BackColor="#f3f3f3" AutoGenerateColumns="False">
                            <AlternatingRowStyle BackColor="#f3f3f3"></AlternatingRowStyle>
                            <Columns>
                                <asp:TemplateField HeaderText="ID">
                                    <ItemTemplate>
                                        <asp:Label ID="SCORERECORD_ID" runat="server" Text='<%#Eval("SCORERECORD_ID")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="学员">
                                    <ItemTemplate>
                                        <asp:Label ID="STUDENT" runat="server" Text='<%#Eval("STUDENT")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="所在分中心">
                                    <ItemTemplate>
                                        <asp:Label ID="BRANCH_SCHOOL_NAME" runat="server" Text='<%#Eval("BRANCH_SCHOOL_NAME") %>'>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="类型">
                                    <ItemTemplate>
                                        <asp:Label ID="CATEGORY" runat="server" Text='<%#Eval("CATEGORY")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="时间">
                                    <ItemTemplate>
                                        <asp:Label ID="OCCUR_DATE" runat="server" Text='<%# Eval("OCCUR_DATE","{0:yyyy-MM-dd}")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="说明">
                                    <ItemTemplate>
                                        <asp:Label ID="DESCRIPTION" runat="server" Text='<%#Eval("DESCRIPTION")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="积分">
                                    <ItemTemplate>
                                        <asp:Label ID="SCORE" runat="server" Text='<%#Eval("SCORE")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td class="page">
                <webdiyer:AspNetPager ID="AspNetPager" runat="server" PageSize="2" CustomInfoHTML=""
                    FirstPageText="<img src='../../images/page07.gif' border=0 valign=middle hspace=3>"
                    LastPageText="<img src=../../images/page07.gif border=0 valign=middle hspace=3>"
                    NextPageText="<img src=../../images/page07.gif border=0 valign=middle hspace=3>"
                    PrevPageText="<img src=../../images/page07.gif border=0 valign=middle hspace=3>"
                    ShowCustomInfoSection="Left" ShowPageIndex="False" TextAfterPageIndexBox="页"
                    TextBeforePageIndexBox="转到" AlwaysShow="True" CustomInfoClass="pageLine" OnPageChanged="AspNetPager_PageChanged"
                    ShowPageIndexBox="Always" CustomInfoSectionWidth="" Wrap="False" SubmitButtonClass="go"
                    SubmitButtonStyle="line-height:16px" SubmitButtonText=" ">
                </webdiyer:AspNetPager>
            </td>
            <td align="right" class="page">
                显示 1 - 20条，共 4465 条
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
